<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div>圆的半径：</div><input id="k" type="text"> 
    <div>圆的周长：</div><input id="k1" type="text">
    <div>圆的面积：</div><input id="k2" type="text">
    <script>
        var r =   window.prompt("请你输入半径");
        if(isNaN(r)==false)
        {
         r = parseInt(r);
         var c = (r*2).toFixed(2);
         var s = (Math.PI*r*r).toFixed(2);
         
        document.getElementById("k").value=r
        document.getElementById("k1").value=c

        document.getElementById("k2").value=s

        }
        else{
            alert("输入错误");
        }

    </script>
      
 
</body>
</html>